package com.moxigua.iotbox.base;

import android.app.Application;

import com.moxigua.iotbox.util.SPUtils;

import cn.jpush.android.api.JPushInterface;

/**
 * Created by junerver on 17-3-8.
 */

public class BaseApplication extends Application {

	private static boolean isOnline = false;
	private static int mLastPacketId = 0;

	@Override

	public void onCreate() {
		super.onCreate();
		SPUtils.init(getApplicationContext());
		// Normal app init code...
		JPushInterface.setDebugMode(true);
		JPushInterface.init(this);
	}

	public static boolean isOnline() {
		return isOnline;
	}

	public static void setIsOnline(boolean isOnline) {
		BaseApplication.isOnline = isOnline;
	}

	public static int getLastPacketId() {
		return mLastPacketId;
	}

	public static void setLastPacketId(int lastPacketId) {
		mLastPacketId = lastPacketId;
	}
}
